﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Documents;
using System.Diagnostics.Contracts;
using ShredTheLog.Api.DataContracts.TextChat;

namespace ShredTheLog.Api
{
    [ContractClass(typeof(TextFormatter_Contract))]
    public interface ITextFormatter
    {
        void Process(string text, Span textSpan, Span embracingSpan);
    }

    [ContractClassFor(typeof(ITextFormatter))]
    internal abstract class TextFormatter_Contract : ITextFormatter
    {
        void ITextFormatter.Process(string text, Span textSpan, Span embracingSpan)
        {
            Contract.Requires(textSpan != null);
            Contract.Requires(embracingSpan != null);
            throw new NotImplementedException();
        }
    }

    [ContractClass(typeof(MessageFormatter_Contract))]
    public interface IMessageFormatter
    {
        void Process(IMessage message, Span userNameSpan, Span textSpan, Span embracingSpan);
    }

    [ContractClassFor(typeof(IMessageFormatter))]
    internal abstract class MessageFormatter_Contract : IMessageFormatter
    {
        void IMessageFormatter.Process(IMessage message, Span userNameSpan, Span textSpan, Span embracingSpan)
        {
            Contract.Requires(message != null);
            Contract.Requires(userNameSpan != null);
            Contract.Requires(textSpan != null);
            Contract.Requires(embracingSpan != null);
            throw new NotImplementedException();
        }
    }
}
